package com.dunshan.hprose.servlet;

import com.dunshan.hprose.service.RpcPojoService;
import hprose.common.HproseMethods;
import hprose.server.HproseServlet;

import javax.servlet.annotation.WebServlet;

/**
 * @author LiWen
 * @version 1.0
 * @Date: 2021-05-04 15:51
 * @Description:
 */
@WebServlet(urlPatterns = {"/hprose/RpcPojoService"})
public class ServicePublish extends HproseServlet {

    @Override
    protected void setGlobalMethods(HproseMethods methods) {
        super.setGlobalMethods(methods);
        //发布sayHello方法
        RpcPojoService service = new RpcPojoService();
        methods.addMethod("sayHello", service);
    }
}
